package com.itheima.admin.controller;

import com.itheima.admin.pojo.AdChannel;
import com.itheima.admin.service.AdChannelService;
import com.itheima.common.vo.ResultVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class AdChannelFaginController {
    //注入service层进行调用
    @Autowired
    private AdChannelService adChannelService;

    @GetMapping("/channel/list")
    public ResultVo<List<AdChannel>> findChannel(){
        List<AdChannel> list = adChannelService.list();
        return ResultVo.ok(list);
    }
}
